package utileria;

import java.awt.GridBagConstraints;
import java.awt.Insets;

import javax.swing.JPanel;

public class ComboBox extends javax.swing.JComboBox<Integer> 
{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	GridBagConstraints c = new GridBagConstraints();
	public ComboBox(int posicionX, int posicionY, Integer datos[],JPanel panel) 
	{
		if(datos != null)
		for (int i = 0; i < datos.length; i++) {
			this.addItem(datos[i]);
		}
		c.gridx = posicionX;
		c.gridy = posicionY;
		c.insets = new Insets(0, 10, 20, 0);
		c.anchor = GridBagConstraints.LAST_LINE_START;
		c.fill = GridBagConstraints.HORIZONTAL;
		panel.add(this, c);
	}
}
